package com.edmond.feign;

import com.edmond.entity.Order;
import com.edmond.entity.OrderVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "ORDER")
public interface OrderFeign {
    @PostMapping("/order/save")
    void save(@RequestBody Order order);

    //  查询当前用户的所有订单
    @GetMapping("/order/findAllByUid/{uid}/{index}/{pageSize}")
    OrderVO findAllByUid(@PathVariable("uid") long uid, @PathVariable("index") Integer index, @PathVariable("pageSize") Integer pageSize);
}
